<template>
  <div class="globalzj grayback">
    <van-nav-bar title="图文问诊" left-arrow @click-left="onClickLeft" />
    <div class="jtlist">
      <div class="doctorinfo">
        <div class="leftinfo">
          <img src="../assets/deafaultAvatar.jpg" alt="" />
        </div>
        <div class="rightinfo">
          <div class="zxys">在线医生</div>
          <div class="ysms">
            请描述你的疾病或症状、是否用药、就诊经历，需要我听过什么样的帮助
          </div>
          <div class="tip">内容仅医生可见</div>
        </div>
      </div>
      <van-field
        v-model="form.remark"
        rows="3"
        autosize
        type="textarea"
        placeholder="请输入病情描述"
      />
      <div class="tip mb">本次患病多久了?</div>
      <van-radio-group v-model="form.radio" direction="horizontal">
        <van-radio name="1">1周内</van-radio>
        <van-radio name="2">1月内</van-radio>
        <van-radio name="3">半年内</van-radio>
        <van-radio name="4">大于半年</van-radio>
      </van-radio-group>
      <div class="tip mb">此次病情是否去医院就诊过?</div>
      <van-radio-group v-model="form.radio1" direction="horizontal">
        <van-radio name="1">是</van-radio>
        <van-radio name="2">否</van-radio>
      </van-radio-group>
      <van-uploader v-model="form.fileList" multiple />
      <van-button type="danger" @click="next" style="width:100%;border-radius:50px">下一步</van-button>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      form: {},
      fileList: [],
    };
  },
  mounted() {
    if (window.localStorage.getItem("form")) {
      this.form = JSON.parse(window.localStorage.getItem("form"))
    }
  },
  methods: {
    next() {
        this.$router.push({
            path:"/xzhz"
        })
      window.localStorage.setItem("form", JSON.stringify(this.form));
    },
    onClickLeft() {
      this.$router.go(-1);
    },
  },
};
</script>
<style scoped>
.zxys {
  text-align: left;
  font-size: 15px;
}
.mb {
  margin-bottom: 10px;
}
.tip {
  font-size: 10px;
  color: #000;
}
.ysms {
  width: 100%;
  height: auto;
  border-radius: 10px;
  padding: 10px;
  box-sizing: border-box;
  background: #f6f7f9;
  margin-top: 10px;
  color: #6f6f6f;
  font-size: 10px;
}
.leftinfo img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}
.rightinfo {
  width: calc(100% - 44px);
  padding: 0px 0px 0px 10px;
  box-sizing: border-box;
  height: auto;
  float: right;
}
.leftinfo {
  width: 44px;
  height: auto;
  float: left;
}
.doctorinfo {
  width: 100%;
  height: auto;
  padding-bottom: 10px;
  box-sizing: border-box;
  border-bottom: 1px solid #e5e5e5;
  overflow: hidden;
}
.jtlist {
  width: 100%;
  height: calc(100% - 46px);
  overflow: auto;
  padding: 15px;
  box-sizing: border-box;
}
</style>